home *** CD-ROM | disk | FTP | other *** search
Wrap
MMMMUUUULLLLTTTTGGGGRRRRPPPPSSSS((((1111)))) MMMMUUUULLLLTTTTGGGGRRRRPPPPSSSS((((1111)))) NNNNAAAAMMMMEEEE multgrps - spawn a shell with membership in multiple groups SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS mmmmuuuullllttttggggrrrrppppssss [----] DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN _m_u_l_t_g_r_p_s creates a new shell process which is simultaneously a member of all groups to which the invoking user belongs. Every user belongs to a default group specified in ////eeeettttcccc////ppppaaaasssssssswwwwdddd. Any additional group memberships are listed in the file ////eeeettttcccc////ggggrrrroooouuuupppp. Traditional System V allows processes to be in only one group at any given time; that group may be changed via the _n_e_w_g_r_p(1) command. A process has group access privileges only to the files whose group ID matches the process's current value. BSD and POSIX systems provide the capability for processes to be members of more than one group at a time. Since IRIX is based on System V, processes are in single-group mode by default. The _m_u_l_t_g_r_p_s(1) command is analogous to _n_e_w_g_r_p(1) with the salient difference that the new shell spawned by _m_u_l_t_g_r_p_s is a member of _a_l_l groups with which the user's login name is listed in ////eeeettttcccc////ggggrrrroooouuuupppp, in addition to the group defined in the ////eeeettttcccc////ppppaaaasssssssswwwwdddd entry. _m_u_l_t_g_r_p_s initializes the group-set of which the calling process (user) is a member. It uses an _i_n_i_t_g_r_o_u_p_s(_3_X) call to obtain the groups from the file ////eeeettttcccc////ggggrrrroooouuuupppp or its NIS equivalent, then spawns a new shell which is a member of them all. The user remains logged in and the current directory is unchanged, but calculations of access permissions to files are performed with respect to the entire set of group IDs. The user is always given a new shell, replacing the current shell, by _m_u_l_t_g_r_p_s, regardless of whether the user is a member of any supplemental groups. In that shell the first group in the list is always the group ID from the user's entry in the ////eeeettttcccc////ppppaaaasssssssswwwwdddd file. Exported variables retain their values after invoking _m_u_l_t_g_r_p_s; however, all unexported variables are either reset to their default value or set to null. System variables (such as PS1, PS2, PATH, MAIL, and HOME), unless exported by the system or explicitly exported by the user, are reset to default values. For example, a user has a primary prompt string (PS1) other than $$$$ (default) and has not exported PS1. After an invocation of _m_u_l_t_g_r_p_s their PS1 will be set to the default prompt string $$$$. Note that the shell command _e_x_p_o_r_t (see _s_h(1)) is the method of exporting variables so that they retain their assigned value when invoking new shells. If the first argument to _m_u_l_t_g_r_p_s is a ----, the environment is changed to what would be expected if the user actually logged in again. The multiple-group shell may be terminated via "exit", which returns to the previous shell. PPPPaaaaggggeeee 1111 MMMMUUUULLLLTTTTGGGGRRRRPPPPSSSS((((1111)))) MMMMUUUULLLLTTTTGGGGRRRRPPPPSSSS((((1111)))) No group password checking is performed. Since ////eeeettttcccc////ggggrrrroooouuuupppp is a system file (writable only by superuser), it is assumed that protection against unintended group-membership is provided by those restricted file permissions. The set of active group IDs may be displayed by invoking _i_d(1) or _g_r_o_u_p_s(1). If _m_u_l_t_g_r_p_s has not been called only the group ID from the user's entry in ////eeeettttcccc////ppppaaaasssssssswwwwdddd will be listed. The maximum number of groups of which a process may be a member is defined (as an lbootable option) in ////vvvvaaaarrrr////ssssyyyyssssggggeeeennnn////mmmmaaaasssstttteeeerrrr....dddd////kkkkeeeerrrrnnnneeeellll, named NNNNGGGGRRRROOOOUUUUPPPPSSSS____MMMMAAAAXXXX. FFFFIIIILLLLEEEESSSS /etc/group system group file /etc/passwd system password file SSSSEEEEEEEE AAAALLLLSSSSOOOO newgrp(1), login(1), id(1), sh(1), getgroups(2), setgroups(2), initgroups(3X), group(4), passwd(4), environ(5) PPPPaaaaggggeeee 2222